]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
XDND: Always update the timestamp on motion
authorAdel Gadllah <adel.gadllah@gmail.com>
Thu, 24 Feb 2011 10:25:29 +0000 (11:25 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Thu, 24 Feb 2011 10:46:53 +0000 (11:46 +0100)
The xdnd timestamp gets updated on every xdnd-position event,
so while waiting for the window timeout to fire we need to make sure we
update the timestamp when getting on motion to activate the window
with the correct timestamp.

js/ui/overview.js

index fd2266b0576e2594b7db890d2b6e3494aa5b1221..fbe8c3e15f340ba39b982209fc163283b2d64027 100644 (file)
@@ -231,6 +231,8 @@ Overview.prototype = {
                              dragEvent.targetActor._delegate &&
                              dragEvent.targetActor._delegate.metaWindow;
 
+        this._windowSwitchTimestamp = global.get_current_time();
+
         if (targetIsWindow &&
             dragEvent.targetActor._delegate.metaWindow == this._lastHoveredWindow)
             return DND.DragMotionResult.CONTINUE;
@@ -245,7 +247,6 @@ Overview.prototype = {
 
         if (targetIsWindow) {
             this._lastHoveredWindow = dragEvent.targetActor._delegate.metaWindow;
-            this._windowSwitchTimestamp = global.get_current_time();
             this._windowSwitchTimeoutId = Mainloop.timeout_add(DND_WINDOW_SWITCH_TIMEOUT,
                                             Lang.bind(this, function() {
                                                 this._needsFakePointerEvent = true;